package org.obm.bigg.model;

import java.util.List;

import com.google.common.collect.ImmutableList;

/**
 * <pre>
 * Messages : { // CF
 * 		messageId1 : { // row key
 *  		subject: bla bla
 *  		to: xx
 *  		cc: yy
 *  		bcc: zz
 *  		conv: INBOX/123-1
 *  		preview : hello world
 *  		body_plain: hello world ! qdqsd
 *  		hasAttach: true
 *  		hasInvitation: false
 *  		attachments: attach_123, attach_456
 *  	}
 * }
 * </pre>
 */
public final class Messages {

	private static final String[] names = {
	// messages column family
			"subject", // mail subject
			"from", // from header
			"to", // recipients
			"cc", // carbon copy
			"bcc", // blind carbon copy
			"conv", // conversation id
			"preview", // first line of body
			"body_plain", // plain text body
			"body_html", // body converted to html
			"has_attachment", // true/false
			"has_invitation", // true/false
			"attachments", // comma separated attachment identifiers list
			"read", // true/false
			"flagged", // true/false
			"answered", // true/false
	};

	public static final List<String> cols;

	public static final String CF = "Messages";
	
	public static final String SUBJECT = "subject";
	public static final String FROM = "from";
	public static final String TO = "to";
	public static final String CC = "cc";
	public static final String BCC = "bcc";
	public static final String CONV = "conv";
	public static final String PREVIEW = "preview";
	public static final String BODY_PLAIN = "body_plain";
	public static final String BODY_HTML = "body_html";
	public static final String HAS_ATTACHMENT = "has_attachment";
	public static final String HAS_INVITATION = "has_invitation";
	public static final String ATTACHMENTS = "subject";
	public static final String READ = "read";
	public static final String FLAGGED = "flagged";
	public static final String ANSWERED = "answered";
	

	static {
		cols = ImmutableList.of(names);
	}

}
